<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setAttribute("basePath", basePath);
String baseInfoJson= (String)request.getAttribute("baseInfoJson");
String transferDeptInfoJson= (String)request.getAttribute("transferDeptInfoJson");
%>

<html>
<head>
<title>解放军第三〇五医院</title>
</head>
<body>
<input type="hidden" id="firstGuid" value="${firstGuid}">
<div id="containt" style="overflow:auto; height:800px;">

</div>
</body>
<script type="text/javascript" src="${basePath}assets/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}assets/js/html2cancas.min.js"></script>
<script  type="text/javascript" src="${basePath}/static/layer/layer.js"></script>
<link href="${basePath}/static/layer/layer_defined.css" rel="stylesheet" type="text/css">

<script type="text/javascript">

initProgressNote();

function initProgressNote() {
	var url = "${basePath}medical_record/getProgressNote";
	//14aa595a06cc428690f875db3e60b66b
	 //console.log(url)
	var dataform = {"visitGuid": $("#firstGuid").val()};
	$.ajax({
	    type:"get",
	    url:url,
	    dataType:"json",
	    data:dataform,
	    beforeSend:function(){
	    	$("#containt").html("");
	 	},
	    success:function(result){
	    	if(result.success){
	               var data = result.data;
	               if (data != null && data.length > 0) {
	            	  var content = "";
	            	   $.each(data, function(index, htmlStr) {
	            		   content+="<div class='cont' style='margin-bottom:10px;'>"+htmlStr+"</div>";
	            	   });
	            	  
	            	 $("#containt").html("");
	            	 $("#containt").html(content);
	            	
	            	var pArr= $(".cont tr p");
	            	for(var i=0;i<pArr.length;i++){
	            		
	            		var phtml=$(pArr[i]).html();
	            		phtml=phtml.replace(/&nbsp/g, "&ensp");
	            		$(pArr[i]).html(phtml);
	            	}
	               }else{
	            	   layer.alert("暂无数据",{icon:7})
	               }
	         }else{
	                layer.alert(result.msg,{icon:7})
	         }
	    },
	    error:function(XMLHttpRequest, textStatus, errorThrown) {
	    	//console.log(errorThrown)
	          if(XMLHttpRequest.status == 403) {
	                 layer.alert("没有权限!",{icon:7});
	          }
	    }  //error end 
	}); //ajax 结束	
	
}

</script>

</html>

